package com.hspud.HomeWork04;
public class Test {
    public static void main(String[] args) {
        CallPhone callPhone = new CallPhone();
        callPhone.testWork(new IA() {
            @Override
            public double work(double n1, double n2) {
                return n1 + n2;
            }
        },10 ,20);
    }
}
interface IA {
    public double work(double n1, double n2);
}

class CallPhone {
    public void testWork(IA ia ,double n1 ,double n2){
        double result = ia.work(n1, n2);
        System.out.println("计算后的结果为：" + result);
    }

}
